package thread;

public class ThreadDemo1 {
    public static void main(String[] args) {
        Thread thread1 = new myThread1();
        Thread thread2=new myThread2();
        thread1.start();
        thread2.start();
    }
}

class myThread1 extends Thread
{
    public void run()
    {
        for (int i = 0; i < 1000; i++) {
            System.out.println("111");
        }
    }
}

class myThread2 extends Thread
{
    public void run()
    {
        for (int i = 0; i < 1000; i++) {
            System.out.println("222");
        }
    }
}
